#ifndef UNREALCONTROLLERBOT_H
#define UNREALCONTROLLERBOT_H

#include "unrealbot.h"
#include "unrealhandler.h"
#include "TeamButton.h"
#include "UnrealBotInfo.h"
#include "unrealflag.h"
#include <set>
using namespace Gtk;
using namespace std;


class UnrealControllerBot : public UnrealBot
{
    public:
		UnrealFlag* flags[2];
		bool mapsKnown;
        set<string> maps;
        vector<UnrealBotInfo*> bots;//array of bots to draw;
        /** Default constructor */
        UnrealControllerBot(RefPtr<SocketClient>& connection, ustring addr, unsigned port);
        /** Default destructor */
        virtual ~UnrealControllerBot();
		virtual bool connect(ustring addr, unsigned port);
        virtual void onAddNativeBot();
        virtual void onSetMap();
        virtual void onToggle();
        virtual void processInput();
        virtual void handleSMap()  ;

        bool addWatchBot(UnrealNativeBot* watchedBot);
        /**
        \return Pointer to the unrealBotInfo of which the given unrealId
        \param  id the given unrealid

        */
        UnrealBotInfo* getBot(string id);
        /**
        \return Pointer to the unrealBotInfo to which the given unrealnativebotid pointer belongs
        \param  id the given unrealid

        */
        UnrealBotInfo* getBot(UnrealNativeBot* id);
        UnrealBotInfo* getBot(unsigned i);

    protected:

        VBox botsBox;
            Toolbar controllerToolbar;
                ToggleToolButton createBotButton;
                ToggleToolButton setSpeedButton;
                ToggleToolButton setMapButton;
            InfoBar addBotBar;
                Entry addBotName;
                TeamButton addBotColor;
                SpinButton  addBotSkill;
                Button addBotOk;
            InfoBar setMapBar;
                ComboBoxText setMapSelect;
                Button setMapOk;
            ScrolledWindow botsScroll;
                VBox botsList;
    private:
};

#endif // UNREALCONTROLLERBOT_H
